/**
 * Copyright (C) 2013-2014 the original author or authors.
 */
package com.foreveross.bsl.common.utils.exception;

import java.util.Date;

/**
 * xxx
 *
 * @author Wangyi
 * @version v1.0
 *
 * @date 2013-8-28
 *
 */
public class ExceptionSpec {
	private boolean result;
	private String code;
	private String message;
	private Date exceptionTime;
	
	/**
	 * 
	 */
	public ExceptionSpec() {
	}
	
	public ExceptionSpec(String code, String msg, Date exceptionTime) {
		this.code = code;
		this.message = msg;
		this.exceptionTime = exceptionTime;
	}

	public ExceptionSpec(String msg, Date exceptionTime) {
		super();
		this.message = msg;
		this.exceptionTime = exceptionTime;
	}

	/**
	 * @return the result
	 */
	public boolean isResult() {
		return result;
	}
	/**
	 * @param result the result to set
	 */
	public void setResult(boolean result) {
		this.result = result;
	}
	/**
	 * @return the code
	 */
	public String getCode() {
		return code;
	}
	/**
	 * @param code the code to set
	 */
	public void setCode(String code) {
		this.code = code;
	}
	/**
	 * @return the msg
	 */
	public String getMessage() {
		return message;
	}
	/**
	 * @param msg the msg to set
	 */
	public void setMessage(String msg) {
		this.message = msg;
	}
	/**
	 * @return the exceptionTime
	 */
	public Date getExceptionTime() {
		return exceptionTime;
	}
	/**
	 * @param exceptionTime the exceptionTime to set
	 */
	public void setExceptionTime(Date exceptionTime) {
		this.exceptionTime = exceptionTime;
	}
	
	@Override
	public String toString() {
		StringBuilder sb=new StringBuilder();
		sb.append("code:").append(code).append(",message:'").append(message).append("',exceptionTime:").append(exceptionTime);
		return sb.toString();
	}
}
